package P150;

/**
 * @author LiangMu
 * @version \$Id: P24.java, v 0.1, 2024年07月05日 14:51 LiangMu Exp $$
 */
public class P24 {

    public static boolean isSubsequence(String s, String t) {
        int si = 0;
        int ti = 0;
        char[] chars1 = s.toCharArray();
        char[] chars2 = t.toCharArray();
        out:
        for (; si < chars1.length; si++) {
            for (; ti < chars2.length; ti++) {
                if (chars2[ti] == chars1[si]) {
                    ti++;
                    continue out;
                }
            }
            break;
        }
        return si == chars1.length;
    }
}
